package com.sky.mapper.user;

import com.sky.pojo.*;
import com.sky.vo.DishItemVO;
import com.sky.vo.DishVO;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user where openid = #{openid}")
    User getByOpenId(String openId);

    void insert(User user);

  /*  @Insert("insert into address_book set user_id =#{userId}, consignee = #{consignee},sex = #{sex},phone = #{phone},province_code = #{provinceCode}, province_name = #{provinceName}, city_code = #{cityCode},  city_name = #{cityName},district_code = #{districtCode}, district_name=#{districtName},detail = #{detail},\n" +
            "    label = #{label}  ; ")
    void addAddressBook(AddressBook addressBook);

    @Select("select * from address_book where user_id = #{currentId} ")
    List<AddressBook> selectAddreeBoodList(Long currentId);

    void updateAddressBook(AddressBook addressBook ,Long id);
    @Delete("delete from address_book where user_id = #{userId} and id = #{id}")

    void deleteAddressBook(int id );

    @Select("select * from address_book where user_id = #{userId} and id = #{id}")
    AddressBook selectAddressById(Long id,Long userId);
    @Select("select * from address_book where user_id = #{userId}")
    AddressBook selectDefalut(Long userId);*/

}
